Optimal. Leaf size=214 \[ \frac {5 i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{a^{5/2} d}+\frac {i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} a^{5/2} d}+\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.48, antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3640, 3677,
3679, 3681, 3561, 212, 3680, 65, 214} \begin {gather*} \frac {5 i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{a^{5/2} d}+\frac {i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} a^{5/2} d}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 214
Rule 3561
Rule 3640
Rule 3677
Rule 3679
Rule 3680
Rule 3681
Rubi steps
\begin {align*} \int \frac {\cot ^2(c+d x)}{(a+i a \tan (c+d x))^{5/2}} \, dx &=\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {\int \frac {\cot ^2(c+d x) \left (6 a-\frac {7}{2} i a \tan (c+d x)\right )}{(a+i a \tan (c+d x))^{3/2}} \, dx}{5 a^2}\\ &=\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {\int \frac {\cot ^2(c+d x) \left (\frac {55 a^2}{2}-\frac {95}{4} i a^2 \tan (c+d x)\right )}{\sqrt {a+i a \tan (c+d x)}} \, dx}{15 a^4}\\ &=\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}+\frac {\int \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)} \left (\frac {315 a^3}{4}-\frac {615}{8} i a^3 \tan (c+d x)\right ) \, dx}{15 a^6}\\ &=\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d}+\frac {\int \cot (c+d x) \sqrt {a+i a \tan (c+d x)} \left (-\frac {75 i a^4}{2}-\frac {315}{8} a^4 \tan (c+d x)\right ) \, dx}{15 a^7}\\ &=\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d}-\frac {(5 i) \int \cot (c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx}{2 a^4}-\frac {\int \sqrt {a+i a \tan (c+d x)} \, dx}{8 a^3}\\ &=\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d}+\frac {i \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{4 a^2 d}-\frac {(5 i) \text {Subst}\left (\int \frac {1}{x \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{2 a^2 d}\\ &=\frac {i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} a^{5/2} d}+\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d}-\frac {5 \text {Subst}\left (\int \frac {1}{i-\frac {i x^2}{a}} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{a^3 d}\\ &=\frac {5 i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{a^{5/2} d}+\frac {i \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} a^{5/2} d}+\frac {\cot (c+d x)}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac {19 \cot (c+d x)}{30 a d (a+i a \tan (c+d x))^{3/2}}+\frac {41 \cot (c+d x)}{12 a^2 d \sqrt {a+i a \tan (c+d x)}}-\frac {21 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.60, size = 263, normalized size = 1.23 \begin {gather*} -\frac {i \left (3+31 e^{2 i (c+d x)}+280 e^{4 i (c+d x)}-151 e^{6 i (c+d x)}-403 e^{8 i (c+d x)}+15 e^{5 i (c+d x)} \left (-1+e^{2 i (c+d x)}\right ) \sqrt {1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )+300 \sqrt {2} e^{5 i (c+d x)} \left (-1+e^{2 i (c+d x)}\right ) \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\frac {\sqrt {2} e^{i (c+d x)}}{\sqrt {1+e^{2 i (c+d x)}}}\right )\right )}{15 a^2 d \left (-1+e^{2 i (c+d x)}\right ) \left (1+e^{2 i (c+d x)}\right )^3 (-i+\tan (c+d x))^2 \sqrt {a+i a \tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1425 vs. \(2 (173 ) = 346\).
time = 0.91, size = 1426, normalized size = 6.66
method | result | size |
default | \(\text {Expression too large to display}\) | \(1426\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 202, normalized size = 0.94 \begin {gather*} -\frac {i \, a {\left (\frac {4 \, {\left (315 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} - 205 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} a - 38 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{2} - 12 \, a^{3}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {7}{2}} a^{3} - {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} a^{4}} + \frac {15 \, \sqrt {2} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right )}{a^{\frac {7}{2}}} + \frac {600 \, \log \left (\frac {\sqrt {i \, a \tan \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {i \, a \tan \left (d x + c\right ) + a} + \sqrt {a}}\right )}{a^{\frac {7}{2}}}\right )}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 612 vs. \(2 (165) = 330\).
time = 0.38, size = 612, normalized size = 2.86 \begin {gather*} -\frac {15 \, \sqrt {\frac {1}{2}} {\left (-i \, a^{3} d e^{\left (7 i \, d x + 7 i \, c\right )} + i \, a^{3} d e^{\left (5 i \, d x + 5 i \, c\right )}\right )} \sqrt {\frac {1}{a^{5} d^{2}}} \log \left (4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{5} d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 15 \, \sqrt {\frac {1}{2}} {\left (i \, a^{3} d e^{\left (7 i \, d x + 7 i \, c\right )} - i \, a^{3} d e^{\left (5 i \, d x + 5 i \, c\right )}\right )} \sqrt {\frac {1}{a^{5} d^{2}}} \log \left (-4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{5} d^{2}}} - a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 150 \, {\left (-i \, a^{3} d e^{\left (7 i \, d x + 7 i \, c\right )} + i \, a^{3} d e^{\left (5 i \, d x + 5 i \, c\right )}\right )} \sqrt {\frac {1}{a^{5} d^{2}}} \log \left (16 \, {\left (3 \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + 2 \, \sqrt {2} {\left (a^{4} d e^{\left (3 i \, d x + 3 i \, c\right )} + a^{4} d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{5} d^{2}}} + a^{2}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) + 150 \, {\left (i \, a^{3} d e^{\left (7 i \, d x + 7 i \, c\right )} - i \, a^{3} d e^{\left (5 i \, d x + 5 i \, c\right )}\right )} \sqrt {\frac {1}{a^{5} d^{2}}} \log \left (16 \, {\left (3 \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} - 2 \, \sqrt {2} {\left (a^{4} d e^{\left (3 i \, d x + 3 i \, c\right )} + a^{4} d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a^{5} d^{2}}} + a^{2}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) - \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-403 i \, e^{\left (8 i \, d x + 8 i \, c\right )} - 151 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 280 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 31 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )}}{120 \, {\left (a^{3} d e^{\left (7 i \, d x + 7 i \, c\right )} - a^{3} d e^{\left (5 i \, d x + 5 i \, c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{2}{\left (c + d x \right )}}{\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.06, size = 201, normalized size = 0.94 \begin {gather*} -\frac {\frac {\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\,19{}\mathrm {i}}{30\,d}+\frac {a\,1{}\mathrm {i}}{5\,d}+\frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^2\,41{}\mathrm {i}}{12\,a\,d}-\frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3\,21{}\mathrm {i}}{4\,a^2\,d}}{a\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}-{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2}}-\frac {\mathrm {atan}\left (\frac {\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{a^3}\right )\,\sqrt {-a^5}\,5{}\mathrm {i}}{a^5\,d}-\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {-a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,a^3}\right )\,\sqrt {-a^5}\,1{}\mathrm {i}}{8\,a^5\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________